Java API参考¶
-
namespace com::orbbec::obsensor¶
- AccelFrame : public com.orbbec.obsensor.Frame
Acceleration streaming data frame
Public Functions
- inline float[] getAccelData ()
Get acceleration frame data
- Returns
float[3]{x,y,z} returns acceleration frame data
-
inline float getTemperature()¶
Get the temperature when the frame is sampled
- Returns
temperature at frame sampling
-
enum AccelFullScaleRange¶
Accelerometer range enumeration
Public Functions
-
inline AccelFullScaleRange(int value)¶
-
inline int value()¶
Get the index corresponding to the accelerometer range
- Returns
index value
Public Members
- FS_2g =(1)
1x the acceleration of gravity
- FS_4g =(2)
4 times the acceleration of gravity
- FS_8g =(3)
8 times the acceleration of gravity
- FS_16g =(4)
16 times the acceleration of gravity
Public Static Functions
-
static inline AccelFullScaleRange get(int value)¶
Get the range enumeration value corresponding to the specified index
- Parameters
value – index value
- Returns
Accelerometer range enumeration value
Private Members
- final int mValue
-
inline AccelFullScaleRange(int value)¶
- AccelStreamProfile : public com.orbbec.obsensor.StreamProfile
Accelerometer Profile
Public Functions
-
inline AccelFullScaleRange getAccelFullScaleRange()¶
Get the range of the accelerometer configuration
- Returns
Accelerometer range AccelFullScaleRange
-
inline SampleRate getAccelSampleRate()¶
Get the sampling frequency of the accelerometer stream configuration
- Returns
Accelerometer sampling frequency SampleRate
-
inline AccelFullScaleRange getAccelFullScaleRange()¶
-
enum AlignMode¶
D2C Status
Public Functions
-
inline AlignMode(int value)¶
-
inline int value()
Get the index corresponding to the data stream format
- Returns
index value
Public Members
- ALIGN_D2C_DISABLE =(0)
Close D2C
- ALIGN_D2C_HW_ENABLE =(1)
Enable hardware D2C
- ALIGN_D2C_SW_ENABLE =(2)
Enable software D2C
Public Static Functions
-
static inline AlignMode get(int value)
Get the data stream format corresponding to the specified index
- Parameters
value – index value
- Returns
data stream format
Private Members
- final int mValue
-
inline AlignMode(int value)¶
-
class CameraParam¶
Camera parameters
Public Functions
-
inline CameraIntrinsic getDepthIntrinsic()¶
Get depth camera internal parameters
- Returns
Returns the depth camera intrinsic parameter CameraIntrinsic
-
inline CameraIntrinsic getColorIntrinsic()¶
Get color camera internal parameters
- Returns
Returns the color camera intrinsic parameter CameraIntrinsic
-
inline CameraDistortion getDepthDistortion()¶
Get depth camera distortion parameters
- Returns
Returns the depth camera distortion parameter CameraDistortion
-
inline CameraDistortion getColorDistortion()¶
Get color camera dewarping parameters
- Returns
Returns the color camera dewarping parameter Distortion
-
inline D2CTransform getD2CTransform()¶
Get rotation/transformation matrix
- Returns
Rotation/Transformation matrix D2CTransform
-
inline boolean isMirrored()¶
Whether the image frame corresponding to this group of parameters is mirrored
- Returns
Whether the image frame corresponding to this group of parameters is mirrored
-
inline CameraIntrinsic getDepthIntrinsic()¶
- CameraParamList : public com.orbbec.obsensor.LobClass
Camera parameter list
Public Functions
-
inline int getCameraParamCount()¶
Get the number of camera parameters
- Returns
The number of camera parameters
-
inline CameraParam getCameraParam(int index)¶
Obtain camera parameters according to the specified index in the camera parameter list
- Parameters
index – index value
- Returns
Camera parameter CameraParam
-
inline void close()¶
resource release
-
inline int getCameraParamCount()¶
- ColorFrame : public com.orbbec.obsensor.VideoFrame
Color stream data frame
- CompressionFilter : public com.orbbec.obsensor.Filter
Public Functions
-
inline CompressionFilter()¶
Create compression filter
- Returns
compression filter object
-
inline void setCompressionParams(CompressionMode mode, CompressionParams params)¶
Set compression parameters
- Parameters
mode – Compression mode CompressionMode#OB_COMPRESSION_LOSSLESS or CompressionMode#OB_COMPRESSION_LOSSY
params – Compression params, struct ob_compression_params, when mode is OB_COMPRESSION_LOSSLESS, params is NULL
-
inline CompressionFilter()¶
-
enum CompressionMode¶
Compression mode
Public Functions
-
inline CompressionMode(int value)¶
-
inline int value()
Get the index corresponding to the compression mode
- Returns
index value
Public Members
- OB_COMPRESSION_LOSSLESS =(0)
- OB_COMPRESSION_LOSSY =(1)
Public Static Functions
-
static inline CompressionMode get(int value)
Get the compression mode corresponding to the specified index
- Parameters
value – index value
- Returns
compression mode
Private Members
- final int mValue
-
inline CompressionMode(int value)¶
- Config : public com.orbbec.obsensor.LobClass
Used to configure Pipeline data flow status
Public Functions
-
inline Config()¶
Create a new pipeline configuration to configure the resolution and frame rate of the data stream and data stream that needs to be opened through the Pipeline
-
inline void enableStream(StreamProfile streamProfile)¶
Start the data stream of the specified configuration
- Parameters
streamProfile – Data flow configurationStreamProfile
-
inline void disableStream(StreamType streamType)¶
Close the data stream of the specified configuration, through this interface, you can configure which data stream needs to be closed
- Parameters
streamType – Data stream configurationStreamType
-
inline void setDepthScaleRequire(boolean enable)¶
Whether the depth needs to be scaled after setting D2C
- Parameters
enable – Whether scaling is required
-
inline void setD2CTargetResolution(int width, int height)¶
Set the D2C target resolution, which is applicable to cases where the Color stream is not enabled using the OrbbecSDK and the depth needs to be D2C Note: When you use OrbbecSDK to enable the Color stream, you also use this interface to set the D2C target resolution. The configuration of the enabled Color stream is preferred for D2C。
- Parameters
width – The D2C target has a wide resolution
height – The D2C targets has a high resolution
-
inline void close()
Release Config object resources
-
inline Config()¶
-
class DataType¶
Data type base class, used to represent the type of Native structure mapped to Java
Subclassed by com.orbbec.obsensor.datatype.CameraDistortion, com.orbbec.obsensor.datatype.CameraIntrinsic, com.orbbec.obsensor.datatype.CompressionParams, com.orbbec.obsensor.datatype.D2CTransform, com.orbbec.obsensor.datatype.DeviceTemperature, com.orbbec.obsensor.datatype.ExposureThresholdControl, com.orbbec.obsensor.datatype.OBRect
Public Functions
- abstract int BYTES ()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline boolean checkInitialized()¶
Check whether the corresponding Java class is initialized successfully
- Returns
Whether the Java class is initialized, false: failure, true: success
- DeCompressionFilter : public com.orbbec.obsensor.Filter
Public Functions
-
inline DeCompressionFilter()¶
Create decompression filter
- Returns
decompression filter object
-
inline DeCompressionFilter()¶
- DepthFrame : public com.orbbec.obsensor.VideoFrame
Depth Streaming DataFrame
Public Functions
-
inline float getValueScale()¶
Get the value scale of the depth frame, the unit is mm/step, such as valueScale=0.1, the pixel value of a certain coordinate is pixelValue=10000, it means the depth value, value = pixelValue*valueScale = 10000*0.1=1000mm。
- Returns
A scale value of depth frame
-
inline float getValueScale()¶
-
enum DepthPrecisionLevel¶
depth precision level
The depth precision level does not completely determine the depth unit and real precision, and the influence of the data packaging format needs to be considered. The specific unit can be obtained through getValueScale() of DepthFrame
Public Functions
-
inline DepthPrecisionLevel(int value)¶
-
inline int value()
Get the index corresponding to the depth precision level
- Returns
index value
Public Members
- OB_PRECISION_1MM =(0)
1mm
- OB_PRECISION_0MM8 =(1)
0.8mm
- OB_PRECISION_0MM4 =(2)
0.4mm
- OB_PRECISION_0MM1 =(3)
0.1mm
- OB_PRECISION_0MM2 =(4)
0.2mm
- OB_PRECISION_COUNT =(5)
Public Static Functions
-
static inline DepthPrecisionLevel get(int value)
Get the depth precision level corresponding to the specified index
- Parameters
value – index value
- Returns
depth precision level
Private Members
- final int mValue
-
inline DepthPrecisionLevel(int value)¶
-
class DepthWorkMode¶
Depth work mode .
Public Functions
-
inline String getName()¶
Get name of work mode
-
inline void setName(String name)¶
Set name of work mode
- inline byte[] getChecksum ()
Get checksum of work mode
- inline void setChecksum (byte[] checksum)
Set checksum of work mode
-
inline String getChecksumHex()¶
Get hex string which come from getChecksum()
-
inline String getName()¶
- Device : public com.orbbec.obsensor.LobClass
Expose orbbec device functions
Public Functions
-
inline Device(long handle)¶
Initialize the device object by specifying the device handle
- Parameters
handle – handle of the initialized device
-
inline List<DevicePropertyInfo> getSupportedPropertyList()¶
Get the list of property information supported by the device
- Returns
List of property information supported by the device List<DevicePropertyInfo>
-
inline List<DepthPrecisionLevel> getSupportedDepthPrecisionLevelList()¶
Get list of DevicePrecisionLevel
- Returns
list of DevicePrecisionLevel
-
inline boolean isPropertySupported(DeviceProperty property, PermissionType permissionType)¶
Query whether the device supports setting the specified device property
- Parameters
property – Device property DeviceProperty
permissionType – Required permission type PermissionType
- Returns
true supports, false does not support
-
inline void setPropertyValueB(DeviceProperty property, boolean value)¶
Set the value of the boolean type device property
- Parameters
property – device property DeviceProperty
value – Set the value of the device property, boolean type
-
inline void setPropertyValueI(DeviceProperty property, int value)¶
Set the value of the int type device property
- Parameters
property – device property DeviceProperty
value – Set the value of the device property, int type
-
inline void setPropertyValueF(DeviceProperty property, float value)¶
Set the value of the float type device property
- Parameters
property – device property DeviceProperty
value – set the value of the device property, float type
-
inline void setPropertyValueDataType(DeviceProperty property, DataType dataType)¶
Set the data structure of the corresponding device properties
- Parameters
property – device property DeviceProperty
dataType – device property data structure DataType
- Throws
OBException – When there is an error in the encapsulation of the data structure to be set
-
inline boolean getPropertyValueB(DeviceProperty property)¶
Get the value of the boolean type device property
- Parameters
property – device property DeviceProperty
- Returns
The value of the device property, boolean type
-
inline int getPropertyValueI(DeviceProperty property)¶
Get the value of the int type device property
- Parameters
property – device property DeviceProperty
- Returns
The value of the device property, int type
-
inline float getPropertyValueF(DeviceProperty property)¶
Get the value of the float type device property
- Parameters
property – device property DeviceProperty
- Returns
The value of the device property, float type
-
inline void getPropertyValueDataType(DeviceProperty property, DataType dataType)¶
Get the data structure of the corresponding device properties
- Parameters
property – device property DeviceProperty
dataType – device property data structure DataType
- Throws
OBException – When there is an error in parsing the obtained data structure
-
inline int getMinRangeI(DeviceProperty property)¶
Get the minimum value supported by the int type device property
- Parameters
property – device property DeviceProperty
- Returns
The minimum value supported by the device property, int type
-
inline float getMinRangeF(DeviceProperty property)¶
Get the minimum value supported by the float type device property
- Parameters
property – device property DeviceProperty
- Returns
The minimum value supported by the device property, float type
-
inline int getMaxRangeI(DeviceProperty property)¶
Get the maximum value supported by the int type device property
- Parameters
property – device property DeviceProperty
- Returns
The maximum value supported by the device property, int type
-
inline float getMaxRangeF(DeviceProperty property)¶
Get the maximum value supported by the float type device property
- Parameters
property – device DeviceProperty
- Returns
The maximum value supported by the device property, float type
-
inline int getStepI(DeviceProperty property)¶
Get the step value at which the int type device property changes within the supported range
- Parameters
property – device property DeviceProperty
- Returns
The step value that changes within the range supported by the device property, int type
-
inline float getStepF(DeviceProperty property)¶
Get the step value at which the float type device property changes within the supported range
- Parameters
property – device property DeviceProperty
- Returns
The step value that changes within the range supported by the device property, float type
-
inline boolean getDefaultB(DeviceProperty property)¶
Get the default value of the boolean type device property
- Parameters
property – device property DeviceProperty
- Returns
The default value supported by the device property, boolean type
-
inline int getDefaultI(DeviceProperty property)¶
Get the default value of the int type device property
- Parameters
property – device property DeviceProperty
- Returns
The default value supported by the device property, int type
-
inline float getDefaultF(DeviceProperty property)¶
Get the default value of the float type device property
- Parameters
property – device property DeviceProperty
- Returns
The default value supported by the device property, float type
-
inline DeviceInfo getInfo()¶
Get device information
- Returns
device information DeviceInfo
-
inline List<Sensor> querySensors()¶
Query the list of sensors contained in the device
- Returns
Sensor list
-
inline Sensor getSensor(SensorType type)¶
Get the sensor of the specified type
- Parameters
type – sensor type SensorType
- Returns
sensor Sensor
-
inline boolean hasSensor(SensorType type)¶
Device is support SensorType
- Parameters
type – sensorType
- Returns
true: support sensorType, false: not support sensorType
-
inline void upgrade(String fileName, UpgradeCallback callback)¶
Upgrade device firmware Cautious: Not supported yet
- Parameters
fileName – firmware path
callback – callback during the upgrade process UpgradeCallback
- Throws
OBException – The firmware path is abnormal
-
inline void upgrade(ByteBuffer buffer, UpgradeCallback callback)¶
Upgrade device firmware
- Parameters
buffer – Firmware file content Caution: ByteBuffer#capacity() is the valid data length.
callback – callback during the upgrade process UpgradeCallback
- Throws
OBException – The firmware path is abnormal
-
inline void sendFileToDestination(String filePath, String dstPath, FileSendCallback callback)¶
Transfer files to the specified path
- Parameters
filePath – source file path
dstPath – Target path
callback – File transfer callbackFileSendCallback
-
inline DeviceTemperature getDeviceTemperature()¶
Get device temperature information
- Returns
temperature information DeviceTemperature
-
inline boolean activateAuthorization(String authCode)¶
Activate the device with an authorization code
- Parameters
authCode – Authorization code
- Returns
Whether the activation is successful, the activation succeeds: true, the activation fails: false
-
inline void setStateChangeListener(OnStateChangeListener listener)¶
Set device status monitoring
- Parameters
listener – callback when device status changes OnStateChangeListener
-
inline void triggerCapture()¶
send the capture command to the device.
The device will start one time image capture after receiving the capture command when it is in the OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING
- Attention
The frequency of the user call this function multiplied by the number of frames per trigger should be less than the frame rate of the stream. The number of frames per trigger can be set by framesPerTrigger.
- Attention
For some models,receive and execute the capture command will have a certain delay and performance consumption, so the frequency of calling this function should not be too high, please refer to the product manual for the specific supported frequency.
- Attention
If the device is not in the OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING mode, device will ignore the capture command.
-
inline void setTimestampResetConfig(TimestampResetConfig config)¶
set the timestamp reset configuration of the device.
-
inline TimestampResetConfig getTimestampResetConfig()¶
get the timestamp reset configuration of the device.
- Returns
OBDeviceTimestampResetConfig return the timestamp reset configuration of the device.
-
inline void timestampReset()¶
send the timestamp reset command to the device.
The device will reset the timer for calculating the timestamp for output frames to 0 after receiving the timestamp reset command when the timestamp reset function is enabled. The timestamp reset function can be enabled by call ob_device_set_timestamp_reset_config.
Before calling this function, user should call ob_device_set_timestamp_reset_config to disable the timestamp reset function (It is not required for some models, but it is still recommended to do so for code compatibility).
- Attention
If the stream of the device is started, the timestamp of the continuous frames output by the stream will jump once after the timestamp reset.
- Attention
Due to the timer of device is not high-accuracy, the timestamp of the continuous frames output by the stream will drift after a long time. User can call this function periodically to reset the timer to avoid the timestamp drift, the recommended interval time is 60 minutes.
-
inline void timerSyncWithHost()¶
synchronize the timer of the device with the host.
After calling this function, the timer of the device will be synchronized with the host. User can call this function to multiple devices to synchronize all timers of the devices.
- Attention
If the stream of the device is started, the timestamp of the continuous frames output by the stream will may jump once after the timer sync.
- Attention
Due to the timer of device is not high-accuracy, the timestamp of the continuous frames output by the stream will drift after a long time. User can call this function periodically to synchronize the timer to avoid the timestamp drift, the recommended interval time is 60 minutes.
-
inline CameraParamList getCalibrationCameraParamList()¶
Get the original parameter list of camera calibration saved in the device.
- Attention
The parameters in the list do not correspond to the current open-current configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the Pipeline::getCameraParam() interface.
- Returns
Camera parameter list CameraParamList
-
inline DepthWorkMode getCurrentDepthWorkMode()¶
Get current depth work mode.
- Returns
ob_depth_work_mode Current depth work mode
-
inline void switchDepthWorkMode(String modeName)¶
Switch depth work mode by work mode name.
- Parameters
modeName – Depth work mode name which equals to DepthWorkMode.name
-
inline List<DepthWorkMode> getDepthWorkModeList()¶
Request support depth work mode list.
-
inline OBNetworkConfig getNetworkConfig()¶
Get network config Only for some network device, Such as Gemini 2 XL,
-
inline void setNetworkConfig(OBNetworkConfig config)¶
Set network config Only for some network device, Such as Gemini 2 XL,
-
inline MultiDeviceSyncConfig getMultiDeviceSyncConfig()¶
get the multi device sync configuration of the device.
- Returns
OBMultiDeviceSyncConfig return the multi device sync configuration of the device.
-
inline void setMultiDeviceSyncConfig(MultiDeviceSyncConfig deviceSyncConfig)¶
set the multi device sync configuration of the device.
- Parameters
config – [in] The multi device sync configuration.
-
inline void reboot()¶
The device restarts. After the device restarts, the original device resources need to be released, and can be re-acquired after the device is reconnected.
-
inline void close()
release device resources
-
inline Device(long handle)¶
-
interface DeviceChangedCallback¶
Callback interface for registering listening device status
Public Functions
-
void onDeviceAttach(DeviceList deviceList)¶
Device addition notification and list
- Parameters
deviceList – Add device list DeviceList
-
void onDeviceDetach(DeviceList deviceList)¶
Device removal notices and lists
- Parameters
deviceList – Remove device list DeviceList
-
void onDeviceAttach(DeviceList deviceList)¶
-
class DeviceInfo : public AutoCloseable¶
Device information
Public Functions
-
inline String getName()¶
Get device name
- Returns
device name
-
inline int getPid()¶
Get device identification number
- Returns
device identification number
-
inline int getVid()¶
Get the company identification number of the device
- Returns
company identification number
-
inline String getSerialNumber()¶
Get device serial number
- Returns
devise serial number
-
inline String getUsbType()¶
Get the USB type the device is connected to
- Returns
The type of USB the device is connected to
-
inline String getConnectionType()¶
Get the connection type of device
- Returns
The device connection type
-
inline String getIpAddress()¶
Get the IP address of the device.
- Attention
Only valid for network devices, otherwise it will return “0.0.0.0”.
- Returns
the IP address of the device, such as “192.168.1.10”
-
inline String getFirmwareVersion()¶
Get firmware version number
- Returns
Returns the firmware version number
-
inline String getHardwareVersion()¶
Get the version number of the hardware
- Returns
Returns the version number of the hardware
-
inline String getExtensionInfo()¶
Get information about extensions obtained from SDK supported by the device.
- Returns
extended information about the device
-
inline String getSupportedMinSdkVersion()¶
Get the minimum version number of the SDK supported by the device
- Returns
Returns the minimum SDK version number supported by the device
-
inline String getAsicName()¶
Get chip type name
- Returns
Returns the chip type name
-
inline DeviceType getDeviceType()¶
Get device type
- Returns
Returns the device type DeviceType
-
inline void close()¶
resource release
-
inline String getName()¶
- DeviceList : public com.orbbec.obsensor.LobClass
Device list
Public Functions
-
inline int getDeviceCount()¶
Get the number of devices
- Returns
the number of devices
-
inline String getName(int index)¶
Get the device serial number according to the specified index in the device list
- Parameters
index – index value
- Returns
devise serial number
-
inline int getPid(int index)¶
Obtain the product identification number of the device according to the specified index in the device list
- Parameters
index – index value
- Returns
product identification number
-
inline int getVid(int index)¶
Obtain the identification number of the company which the device belongs according to the specified index in the device list
- Parameters
index – index value
- Returns
company identification number
-
inline String getUid(int index)¶
Obtain the unique ID of the device according to the specified index in the device list
- Parameters
index – index value
- Returns
Device Unique ID
-
inline String getDeviceSerialNumber(int index)¶
Get the device serial number according to the specified index in the device list
- Parameters
index – index value
- Returns
devise serial number
-
inline String getConnectionType(int index)¶
Get device connection type.
- Parameters
index – device index
- Returns
const char* returns connection type,currently supports:”USB”, “USB1.0”, “USB1.1”, “USB2.0”, “USB2.1”, “USB3.0”, “USB3.1”, “USB3.2”, “Ethernet”
-
inline String getIpAddress(int index)¶
get the ip address of the device at the specified index
- Attention
Only valid for network devices, otherwise it will return “0.0.0.0”.
- Parameters
index – the index of the device
- Returns
the ip address of the device
-
inline String getExtensionInfo(int index)¶
Get the device extension information.
-
inline Device getDevice(int index)¶
Get the device object according to the specified index in the device list
- Parameters
index – index value
- Returns
designated device
-
inline Device getDeviceBySerialNumber(String serialNum)¶
Create a device, if the device has been acquired and created elsewhere, repeated acquisition will return an error
- Parameters
serialNum – The serial number of the device to be created
- Returns
Returns the created device Device
-
inline Device getDeviceByUid(String uid)¶
Create a device, if the device has been acquired and created elsewhere, repeated acquisition will return an error
- Parameters
uid – The uid of the device to create
- Returns
Returns the created device Device
-
inline void close()
resource release
-
inline int getDeviceCount()¶
-
enum DeviceProperty¶
Device Property
Public Functions
-
inline DeviceProperty(int value)¶
-
inline int value()
Get the index corresponding to the device property
- Returns
index value
Public Members
- OB_PROP_LDP_BOOL =(2)
LDP switch
- OB_PROP_LASER_BOOL =(3)
laser switch
- OB_PROP_LASER_PULSE_WIDTH_INT =(4)
laser pulse width
- OB_PROP_LASER_CURRENT_FLOAT =(5)
Laser current (unit: mA)
- OB_PROP_FLOOD_BOOL =(6)
IR flood switch
- OB_PROP_FLOOD_LEVEL_INT =(7)
IR flood level
- OB_PROP_DEPTH_MIRROR_BOOL =(14)
depth mirror
- OB_PROP_DEPTH_FLIP_BOOL =(15)
depth flip
- OB_PROP_DEPTH_POSTFILTER_BOOL =(16)
depth post filter
- OB_PROP_DEPTH_HOLEFILTER_BOOL =(17)
depth hole filter
- OB_PROP_IR_MIRROR_BOOL =(18)
IR mirror
- OB_PROP_IR_FLIP_BOOL =(19)
IR flip
- OB_PROP_MIN_DEPTH_INT =(22)
minimum depth threshold
- OB_PROP_MAX_DEPTH_INT =(23)
maximum depth threshold
- OB_PROP_DEPTH_SOFT_FILTER_BOOL =(24)
Software filter switch
- OB_PROP_LDP_STATUS_BOOL =(32)
LDP status
- OB_PROP_DEPTH_MAX_DIFF_INT =(40)
soft filter maxdiff param
- OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT =(41)
soft filter maxSpeckleSize
- OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL =(42)
Hardware d2c is on
- OB_PROP_TIMESTAMP_OFFSET_INT =(43)
time stamp adjustment
- OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL =(61)
Hardware de-distortion switch Rectify
- OB_PROP_FAN_WORK_MODE_INT =(62)
Fan switch mode
- OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT =(63)
Multi-resolution D2C mode
- OB_PROP_ANTI_COLLUSION_ACTIVATION_STATUS_BOOL =(64)
Anti_collusion activation status
- OB_PROP_DEPTH_PRECISION_LEVEL_INT =(75)
The depth precision level may change the depth frame data unit. You need to confirm the setting parameters through the ValueScale interface of DepthFrame. Set parameter reference DepthPrecisionLevel#value() The obtained value can be converted through DepthPrecisionLevel#get(int)
- OB_PROP_TOF_FILTER_RANGE_INT =(76)
tof filter scene range configuration
- OB_PROP_LASER_MODE_INT =(79)
mx6600 laser lighting mode, the firmware only returns 1: IR Drive, 2: Torch at present
- OB_PROP_RECTIFY2_BOOL =(80)
mx6600 brt2r-rectify function switch (brt2r is a special module on mx6600), false: Disable, true: Rectify Enable
- OB_PROP_COLOR_MIRROR_BOOL =(81)
color mirror
- OB_PROP_COLOR_FLIP_BOOL =(82)
color flip
- OB_PROP_INDICATOR_LIGHT_BOOL =(83)
indicator light switch false: Disable, true: Enable
- OB_PROP_DISPARITY_TO_DEPTH_BOOL =(85)
Hardware parallax to depth switch, 0: Turn off the hardware parallax to depth switch, turn on the software parallax to depth switch 1.Turn on the hardware parallax to depth switch, turn off the software parallax to depth switch
- OB_PROP_BRT_BOOL =(86)
BRT function switch (anti-background interference), false: Disable, true: Enable
- OB_PROP_WATCHDOG_BOOL =(87)
Watchdog function switch, false: Disable, true: Enable
- OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL =(88)
External signal triggers restart function switch, false: Disable, true: Enable
- OB_PROP_HEARTBEAT_BOOL =(89)
Heartbeat monitoring function switch, false: Disable, true: Enable
- OB_PROP_DEPTH_CROPPING_MODE_INT =(90)
Depth cropping mode device: OB_DEPTH_CROPPING_MODE_EM (currently only suitable for Longquan Sword)
- OB_PROP_D2C_PREPROCESS_BOOL =(91)
D2C preprocessing switch (such as RGB cropping), false: off, true: on
- OB_PROP_RGB_CUSTOM_CROP_BOOL =(94)
custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued
- OB_PROP_DEVICE_WORK_MODE_INT =(95)
Device operating mode (power consumption)
- OB_PROP_DEVICE_COMMUNICATION_TYPE_INT =(97)
Device communication type, 0: USB; 1: Ethernet(RTSP)
- OB_PROP_SWITCH_IR_MODE_INT =(98)
Switch IR mode, 0: IR active mode, 1: IR passive mode
- OB_PROP_LASER_ENERGY_LEVEL_INT =(99)
Laser energy level
- OB_PROP_LDP_MEASURE_DISTANCE_INT =(100)
LDP’s measure distance, unit: mm
- OB_PROP_TIMER_RESET_SIGNAL_BOOL =(104)
Reset device time to zero
- OB_PROP_TIMER_RESET_TRIGGLE_OUT_ENABLE_BOOL =(105)
Enable send reset device time signal to other device. true: enable, false: disable
- OB_PROP_TIMER_RESET_DELAY_US_INT =(106)
Delay to reset device time, unit: us
- OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL =(107)
Signal to capture image
- OB_PROP_IR_RIGHT_MIRROR_BOOL =(112)
Right IR sensor mirror state
- OB_PROP_CAPTURE_IMAGE_FRAME_NUMBER_INT =(113)
Number frame to capture once a ‘OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL’ effect. range: [1, 255]
- OB_PROP_IR_RIGHT_FLIP_BOOL =(114)
Right IR sensor flip state. true: flip image, false: origin, default: false
- OB_PROP_COLOR_ROTATE_INT =(115)
Color sensor rotation, angle{0, 90, 180, 270}
- OB_PROP_IR_ROTATE_INT =(116)
IR/Left-IR sensor rotation, angle{0, 90, 180, 270}
- OB_PROP_IR_RIGHT_ROTATE_INT =(117)
Right IR sensor rotation, angle{0, 90, 180, 270}
- OB_PROP_DEPTH_ROTATE_INT =(118)
Depth sensor rotation, angle{0, 90, 180, 270}
- OB_PROP_LASER_HW_ENERGY_LEVEL_INT =(119)
Get hardware laser energy level which real state of laser element. OB_PROP_LASER_ENERGY_LEVEL_INT(99)will effect this command which it setting and changed the hardware laser energy level.
- OB_PROP_USB_POWER_STATE_INT =(121)
USB’s power state, enum type: OBUSBPowerState
- OB_PROP_DC_POWER_STATE_INT =(122)
DC’s power state, enum type: OBDCPowerState
- OB_PROP_DEVICE_DEVELOPMENT_MODE_INT =(129)
Device development mode switch, optional modes can refer to the definition in OBDeviceDevelopmentMode,the default mode is OB_USER_MODE
- Attention
The device takes effect after rebooting when switching modes.
- OB_PROP_SYNC_SIGNAL_TRIGGER_OUT_BOOL =(130)
Multi-DeviceSync synchronized signal trigger out is enable state. true: enable, false: disable
- OB_PROP_RESTORE_FACTORY_SETTINGS_BOOL =(131)
Restore factory settings and factory parameters
- Attention
This command can only be written, and the parameter value must be true. The command takes effect after restarting the device.
- OB_PROP_BOOT_INTO_RECOVERY_MODE_BOOL =(132)
Enter recovery mode (flashing mode) when boot the device
- Attention
The device will take effect after rebooting with the enable option. After entering recovery mode, you can upgrade the device system. Upgrading the system may cause system damage, please use it with caution.
- OB_PROP_DEVICE_IN_RECOVERY_MODE_BOOL =(133)
Query whether the current device is running in recovery mode (read-only)
- OB_PROP_DEVICE_REBOOT_DELAY_INT =(142)
Reboot device delay mode. Data type: uint32_t, Delay time unit: ms, range: [0, 8000).
- OB_STRUCT_BASELINE_CALIBRATION_PARAM =(1002)
Baseline calibration parameters
- OB_STRUCT_DEVICE_TEMPERATURE =(1003)
Device temperature
- OB_STRUCT_TOF_EXPOSURE_THRESHOLD_CONTROL =(1024)
TOF exposure threshold range
- OB_STRUCT_DEVICE_SERIAL_NUMBER =(1035)
get serial number
- OB_STRUCT_DEVICE_TIME =(1037)
get/set device time
- OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG =(1038)
Multi-device synchronization mode and parameter configuration
- OB_STRUCT_RGB_CROP_ROI =(1040)
RGB cropping ROI
- OB_STRUCT_DEVICE_IP_ADDR_CONFIG =(1041)
Device IP address configuration
- OB_STRUCT_CURRENT_DEPTH_ALG_MODE =(1043)
The current camera depth mode
- OB_STRUCT_DEPTH_PRECISION_SUPPORT_LIST =(1045)
A list of depth accuracy levels, returning an array of uin16_t, corresponding to the enumeration definitions of the accuracy classes
- OB_PROP_COLOR_AUTO_EXPOSURE_BOOL =(2000)
Color camera auto exposure
- OB_PROP_COLOR_EXPOSURE_INT =(2001)
Color camera exposure adjustment
- OB_PROP_COLOR_GAIN_INT =(2002)
Color camera gain adjustment
- OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL =(2003)
Color camera automatic white balance
- OB_PROP_COLOR_WHITE_BALANCE_INT =(2004)
Color camera white balance adjustment
- OB_PROP_COLOR_BRIGHTNESS_INT =(2005)
Color camera brightness adjustment
- OB_PROP_COLOR_SHARPNESS_INT =(2006)
Color camera sharpness adjustment
- OB_PROP_COLOR_SATURATION_INT =(2008)
Color camera saturation adjustment
- OB_PROP_COLOR_CONTRAST_INT =(2009)
Color camera contrast adjustment
- OB_PROP_COLOR_GAMMA_INT =(2010)
Color camera gamma adjustment
- OB_PROP_COLOR_ROLL_INT =(2011)
Color camera image rotation
- OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT =(2012)
Color camera auto exposure priority
- OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT =(2013)
Color camera brightness compensation
- OB_PROP_COLOR_HUE_INT =(2014)
color camera color tint
- OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT =(2015)
Color camera power line frequency
- OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL =(2016)
Automatic exposure of depth camera (infrared camera will be set synchronously under some models of devices)
- OB_PROP_DEPTH_EXPOSURE_INT =(2017)
Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of devices)
- OB_PROP_DEPTH_GAIN_INT =(2018)
Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices)
- OB_PROP_IR_AUTO_EXPOSURE_BOOL =(2025)
Infrared camera auto exposure (depth camera will be set synchronously under some models of devices)
- OB_PROP_IR_EXPOSURE_INT =(2026)
Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously)
- OB_PROP_IR_GAIN_INT =(2027)
Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices)
- OB_PROP_IR_CHANNEL_DATA_SOURCE_INT =(2028)
Select Infrared camera data source channel. If not support throw exception. 0 : IR stream from IR Left sensor; 1 : IR stream from IR Right sensor;
- OB_PROP_DEPTH_RM_FILTER_BOOL =(2029)
Depth effect dedistortion, true: on, false: off. mutually exclusive with D2C function, RM_Filter disable When hardware or software D2C is enabled.
- OB_PROP_COLOR_MAXIMAL_GAIN_INT =(2030)
Color camera maximal gain
- OB_PROP_COLOR_MAXIMAL_SHUTTER_INT =(2031)
Color camera shutter gain
- OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL =(3007)
Depth data unpacking function switch (each open stream will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
- OB_PROP_SDK_IR_FRAME_UNPACK_BOOL =(3008)
IR data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
- OB_PROP_SDK_ACCEL_FRAME_TRANSFORMED_BOOL =(3009)
Accel data conversion function switch (on by default)
- OB_PROP_SDK_GYRO_FRAME_TRANSFORMED_BOOL =(3010)
Gyro data conversion function switch (on by default)
- OB_PROP_SDK_IR_LEFT_FRAME_UNPACK_BOOL =(3011)
Left IR frame data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
- OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL =(3012)
Right IR frame data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
- OB_RAW_DATA_CAMERA_CALIB_JSON_FILE =(4029)
Calibration JSON file read from device (Femto Mega, read only)
Public Static Functions
-
static inline DeviceProperty get(int value)
Get the device properties corresponding to the specified index
- Parameters
value – index value
- Returns
device properties
Private Members
- final int mValue
-
inline DeviceProperty(int value)¶
-
class DevicePropertyInfo¶
Characteristics used to describe each property
Public Functions
-
inline DeviceProperty getProperty()¶
get property
- Returns
return property DeviceProperty
-
inline String getPropertyName()¶
get property name
- Returns
return property name
-
inline PropertyType getPropertyType()¶
get property type
- Returns
returns property type PropertyType
-
inline PermissionType getPermissionType()¶
Get the permission type of the property
- Returns
Returns the attribute’s permission type PermissionType
-
inline DeviceProperty getProperty()¶
-
enum DeviceType¶
Device Type
Public Functions
-
inline DeviceType(int value)¶
-
inline int value()
The index corresponding to the device type
- Returns
index value
Public Members
- OB_STRUCTURED_LIGHT_MONOCULAR_CAMERA =(0)
monocular structured light camera
- OB_STRUCTURED_LIGHT_BINOCULAR_CAMERA =(1)
Binocular structured light camera
- OB_TOF_CAMERA =(2)
tof camera
Public Static Functions
-
static inline DeviceType get(int value)
Get the device type corresponding to the specified index
- Parameters
value – index value
- Returns
device type
Private Members
- final int mValue
-
inline DeviceType(int value)¶
-
interface FileSendCallback¶
File transfer callback class
Public Functions
-
void onCallback(short state, short percent, String msg)¶
file transfer callback
- Parameters
state – current state
msg – status information
percent – current status progress, percentage 0~100
Public Members
-
short FILE_TRAN_STAT_TRANSFER = 2¶
file transfer
-
short FILE_TRAN_STAT_DONE = 1¶
File transfer succeeded
-
short FILE_TRAN_STAT_PREPARE = 0¶
preparing
-
short FILE_TRAN_ERR_DDR = -1¶
DDR access failed
-
short FILE_TRAN_ERR_NOT_ENOUGH_SPACE = -2¶
Insufficient target space error
-
short FILE_TRAN_ERR_PATH_NOT_WRITABLE = -3¶
Destination path is not writable
-
short FILE_TRAN_ERR_MD5_ERROR = -4¶
MD5 checksum error
-
short FILE_TRAN_ERR_WRITE_FLASH_ERROR = -5¶
write flash error
-
short FILE_TRAN_ERR_TIMEOUT = -6¶
timeout error
-
void onCallback(short state, short percent, String msg)¶
- Filter : public com.orbbec.obsensor.LobClass , public Cloneable
Base class for all filters
Subclassed by com.orbbec.obsensor.CompressionFilter, com.orbbec.obsensor.DeCompressionFilter, com.orbbec.obsensor.FormatConvertFilter, com.orbbec.obsensor.PointCloudFilter
Public Functions
-
inline Frame process(Frame frame)¶
Process the data frame to get the format converted data frame
- Parameters
frame – The data frame to be converted
- Returns
Formatted Frame
-
inline void reset()¶
Filter reset, after reset, you can reset the format of the filter for the processing of another format
-
inline void setCallback(FilterCallback callback)¶
Filter sets the processing result callback function (asynchronous callback interface)
- Parameters
callback – filter callback
-
inline void pushFrame(Frame frame)¶
filter pushes frame_set into the pending buffer (asynchronous callback interface)
- Parameters
frame – data frame
-
inline void close()
release data frame resources
-
inline Frame process(Frame frame)¶
-
interface FilterCallback¶
Filter callback
Public Functions
-
void onFrame(Frame frame)¶
dataframe callback
- Parameters
frame – dataframe
-
void onFrame(Frame frame)¶
-
enum Format¶
Enumeration value describing pixel format
Public Functions
-
inline Format(int value)¶
-
inline int value()
Get the index corresponding to the data stream format
- Returns
index value
Public Members
- YUYV =(0)
YUYV format
- YUY2 =(1)
YUY2 format (the actual format is the same as YUYV)
- UYVY =(2)
UYVY format
- NV12 =(3)
NV12 format
- NV21 =(4)
NV21 format
- MJPG =(5)
MJPG encoding format
- H264 =(6)
H.264 encoding format
- H265 =(7)
H.265 encoding format
- Y16 =(8)
Y16 format, single channel 16bit depth
- Y8 =(9)
Y8 format, single channel 8bit depth
- Y10 =(10)
Y10 format, single channel 10bit depth (SDK will unpack into Y16 by default)
- Y11 =(11)
Y11 format, single channel 11bit depth (SDK will unpack into Y16 by default)
- Y12 =(12)
Y12 format, single channel 12bit depth (SDK will unpack into Y16 by default)
- GRAY =(13)
GRAY (the actual format is the same as YUYV)
- HEVC =(14)
HEVC encoding format (the actual format is the same as H265)
- I420 =(15)
I420 format
- ACCEL =(16)
Accelerometer data format
- GYRO =(17)
Gyroscope data format
- POINT =(19)
xyz 3D coordinate point format
- RGB_POINT =(20)
xyz 3D coordinate point format with RGB information
- RLE =(21)
RLE pressure test format (SDK will be unpacked into Y16 by default)
- RGB888 =(22)
RGB888 format
- BGR =(23)
BGR format (actual BRG888)
- Y14 =(24)
Y14 format, single channel 14bit depth (SDK will unpack into Y16 by default)
- BGRA =(25)
BGRA format
- COMPRESSED =(26)
Compression format
- RVL =(27)
RVL pressure test format (SDK will be unpacked into Y16 by default)
- UNKNOWN =(0xff)
unknown format
Public Static Functions
-
static inline Format get(int value)
Get the data stream format corresponding to the specified index
- Parameters
value – index value
- Returns
data stream format
Private Members
- final int mValue
-
inline Format(int value)¶
- FormatConvertFilter : public com.orbbec.obsensor.Filter
FormatConvertFilter For data stream format conversion
Public Functions
-
inline FormatConvertFilter()¶
Create a format conversion filter
-
inline void setFormatType(FormatConvertType type)¶
Set the data stream conversion format
- Parameters
type – Data Stream Transformation Format
-
inline FormatConvertFilter()¶
-
enum FormatConvertType¶
for data stream format conversion
Public Functions
-
inline FormatConvertType(int value)¶
-
inline int value()
Get the data stream conversion format corresponding to a specific index value
- Returns
index value
Public Members
- FORMAT_YUYV_TO_RGB888 =(0)
YUYV to RGB888
- FORMAT_I420_TO_RGB888 =(1)
I420 to RGB888
- FORMAT_NV21_TO_RGB888 =(2)
NV21 to RGB888
- FORMAT_NV12_TO_RGB888 =(3)
NV12 to RGB888
- FORMAT_MJPEG_TO_I420 =(4)
MJPG to I420
- FORMAT_RGB888_TO_BGR =(5)
RGB888 to BGR
- FORMAT_MJPEG_TO_NV21 =(6)
MJPG to NV21
- FORMAT_MJPEG_TO_RGB888 =(7)
MJPG to RG888
Public Static Functions
-
static inline FormatConvertType get(int value)
Get the data stream conversion format corresponding to the specified index
- Parameters
value – index value
- Returns
data stream format
Private Members
- final int mValue
-
inline FormatConvertType(int value)¶
- Frame : public com.orbbec.obsensor.LobClass , public Cloneable
The data frame in the data stream is the base class of ColorFrame, DepthFrame, IRFrame, VideoFrame, FrameSet
Subclassed by com.orbbec.obsensor.AccelFrame, com.orbbec.obsensor.FrameSet, com.orbbec.obsensor.GyroFrame, com.orbbec.obsensor.PointFrame, com.orbbec.obsensor.VideoFrame
Public Functions
-
inline long getSystemTimeStamp()¶
Get the system timestamp of the data frame, unit: ms
- Returns
system timestamp
-
inline long getTimeStamp()¶
Get the device timestamp of the data frame, unit: ms
- Returns
device timestamp
-
inline BigInteger getTimeStampUs()¶
Get the device timestamp of the data frame, unit: us
@history delete ‘long getTimeStampUs()’ because it wrong if encounter java long return from C native unsigned long long is overflow
- Returns
device timestamp
-
inline FrameType getStreamType()¶
Get the data stream type to which the data frame belongs
- Returns
Data stream type FrameType
-
inline Format getFormat()¶
Get the data stream format to which the data frame belongs
- Returns
Data Stream Format
-
inline long getFrameIndex()¶
Get the sequence number of the data frame in the data stream
- Returns
data frame number
-
inline int getDataSize()¶
Get the data size of the data frame
- Returns
data size
- inline int getData (byte[] buf)
Get the data of the dataframe
- Parameters
buf – byte array to fill frame data
- Returns
success, return the size of data had fill to buf; failed, return -1;
-
inline int getData(ByteBuffer directByteBuffer)¶
Get the data of the dataFrame
- Parameters
directByteBuffer – ByteBuffer to fill frame data.
- Returns
success, return the size of data had fill to buf; failed, return -1;
-
inline ByteBuffer getDirectBuffer()¶
Get the buffer of frame data
The buffer should be consumed before the frame closed
- Returns
return the buffer of the frame data
-
inline int getMetadataSize()¶
Get the metadata size of the frame
- Returns
Returns the metadata size of the frame
- inline void getMetadata (byte[] metadata)
Get the metadata of the frame
- Parameters
metadata – frame metadata
-
inline void close()
release data frame resources
-
inline long getSystemTimeStamp()¶
-
interface FrameCallback¶
data frame callback interface
-
class FrameHelper¶
Public Static Functions
- static inline Frame createFrameFromBuffer (Format format, int width, int height, byte[] buffer)
Create a frame object based on an externally created Buffer.
- Parameters
format – frame object format
width – frame object width
height – frame object height
buffer – frame object buffer
- Returns
frame object
-
static inline FrameSet createFrameSet()¶
Creates an empty frame collection object.
- Returns
frameset object
-
static inline void pushFrame(Frame frameSet, FrameType frameType, Frame frame)¶
Populate the frame collection with frames of the corresponding type.
- Parameters
frameSet – frameset object
frameType – the type of frame filled in
frame – the object that fills the frame
-
static inline void setFrameSystemTimestamp(Frame frame, long systemTimestamp)¶
Set the system timestamp of the frame.
- Parameters
frame – object for frame settings
systemTimestamp – set by systemTimestamp
-
static inline void setFrameDeviceTimestamp(Frame frame, long deviceTimestamp)¶
Set the device timestamp of the frame.
- Parameters
frame – object for frame settings
deviceTimestamp – set by deviceTimestamp
-
static inline void setFrameDeviceTimestampUs(Frame frame, long deviceTimestampUs)¶
Set the device timestamp of the frame.
- Parameters
frame – object for frame settings
deviceTimestampUs – the device timestamp set (Us)
- FrameSet : public com.orbbec.obsensor.Frame
Data frame set, including 0~N data frames
Public Functions
-
inline int getFrameCount()¶
Get the number of frames in a dataframe set
- Returns
number of frames
-
inline DepthFrame getDepthFrame()¶
get depth data frame
- Returns
depth data frame DepthFrame
-
inline ColorFrame getColorFrame()¶
Get color data frame
- Returns
color data frame ColorFrame
-
inline PointFrame getPointFrame()¶
Get point cloud data from a collection of frames
- Returns
Return point cloud frame PointFrame
-
inline void close()
release dataframe set resources
-
inline int getFrameCount()¶
-
interface FrameSetCallback¶
frameset callback interface
-
enum FrameType¶
Describe the Frame type enumeration value
Public Functions
-
inline FrameType(int value)¶
-
inline int value()
Get the index corresponding to the data frame type
- Returns
index value
Public Members
- VIDEO =(0)
Video frames (infrared, color, depth frames are all video frames)
- IR =(1)
Infrared frame
- COLOR =(2)
color frame
- DEPTH =(3)
depth frame
- ACCEL =(4)
Accelerometer data frame
- FRAME_SET =(5)
Frame collection (internally contains a variety of data frames)
- POINTS =(6)
point cloud frame
- GYRO =(7)
Gyroscope data frame
- IR_LEFT =(8)
Left IR frame
- IR_RIGHT =(9)
Right IR frame
- RAW_PHASE =(10)
Rawphase frame
Public Static Functions
-
static inline FrameType get(int value)
Get the data frame type corresponding to the specified index
- Parameters
value – index value
- Returns
data frame type
Private Members
- final int mValue
-
inline FrameType(int value)¶
- GyroFrame : public com.orbbec.obsensor.Frame
Gyroscope data frame
Public Functions
- inline float[] getGyroData ()
Get gyroscope data
- Returns
float[3]{x,y,z} returns acceleration data
-
inline float getTemperature()
Get the temperature when the frame is sampled
- Returns
temperature at frame sampling
-
enum GyroFullScaleRange¶
Enumeration of gyroscope ranges
Public Functions
-
inline GyroFullScaleRange(int value)¶
-
inline int value()
Get the index corresponding to the gyro range
- Returns
index value
Public Members
- FS_16dps =(1)
16 degrees per second
- FS_31dps =(2)
31 degrees per second
- FS_62dps =(3)
62 degrees per second
- FS_125dps =(4)
125 degrees per second
- FS_250dps =(5)
250 degrees per second
- FS_500dps =(6)
500 degrees per second
- FS_1000dps =(7)
1000 degrees per second
- FS_2000dps =(8)
2000 degrees per second
Public Static Functions
-
static inline GyroFullScaleRange get(int value)
Get the range enumeration value corresponding to the specified index of the gyroscope
- Parameters
value – index value
- Returns
Gyroscope range enumeration
Private Members
- final int mValue
-
inline GyroFullScaleRange(int value)¶
- GyroStreamProfile : public com.orbbec.obsensor.StreamProfile
Gyro stream profile
Public Functions
-
inline GyroFullScaleRange getGyroFullScaleRange()¶
Get the range of the gyroscope configuration
- Returns
Gyroscope range GyroFullScaleRange
-
inline SampleRate getGyroSampleRate()¶
Get the data sampling rate of the gyroscope configuration
- Returns
Gyroscope data sample rate SampleRate
-
inline GyroFullScaleRange getGyroFullScaleRange()¶
-
enum HPStatusCode¶
send data or receive data return status type
Public Members
- HP_STATUS_OK =(0)
success
- HP_STATUS_NO_DEVICE_FOUND =(1)
No device found
- HP_STATUS_CONTROL_TRANSFER_FAILED =(2)
Transfer failed
- HP_STATUS_UNKNOWN_ERROR =(0xffff)
Unknown error
Public Static Functions
-
static inline HPStatusCode get(int value)
Get the sensor type corresponding to the specified index
- Parameters
value – index value
- Returns
sensor type
Private Functions
-
inline HPStatusCode(int value)¶
Private Members
- final int mValue
- IRFrame : public com.orbbec.obsensor.VideoFrame
IR frame
-
class LobClass : public AutoCloseable¶
SDK base class, loading core SDK Library
Subclassed by com.orbbec.obsensor.CameraParamList, com.orbbec.obsensor.Config, com.orbbec.obsensor.Device, com.orbbec.obsensor.DeviceList, com.orbbec.obsensor.Filter, com.orbbec.obsensor.Frame, com.orbbec.obsensor.OBContext, com.orbbec.obsensor.Pipeline, com.orbbec.obsensor.Playback, com.orbbec.obsensor.Recorder, com.orbbec.obsensor.Sensor, com.orbbec.obsensor.StreamProfile, com.orbbec.obsensor.StreamProfileList
Public Functions
-
inline long getHandle()¶
Get the current class handle
- Returns
handle
-
inline long getHandle()¶
-
enum LogSeverity¶
log level, the higher the level, the stronger the log filter
Public Functions
-
inline LogSeverity(int value)¶
-
inline int value()
Get the index corresponding to the log output level
- Returns
index value
Public Members
- DEBUG =(0)
debug
- INFO =(1)
information
- WARN =(2)
warning
- ERROR =(3)
error
- FATAL =(4)
fatal error
- NONE =(5)
None (close LOG)
Public Static Functions
-
static inline LogSeverity get(int value)
Get the log output level corresponding to the specified index
- Parameters
value – index value
- Returns
log output level
Private Members
- final int mValue
-
inline LogSeverity(int value)¶
-
enum MediaState¶
Record playback status
Public Functions
-
inline MediaState(int value)¶
-
inline int value()
Get the index corresponding to the recording and playback status
- Returns
index value
Public Members
- OB_MEDIA_BEGIN =(0)
start
- OB_MEDIA_PAUSE =(1)
pause
- OB_MEDIA_RESUME =(2)
recover
- OB_MEDIA_END =(3)
end
Public Static Functions
-
static inline MediaState get(int value)
Get the recording and playback status corresponding to the specified index
- Parameters
value – index value
- Returns
Record playback status
Private Members
- final int mValue
-
inline MediaState(int value)¶
-
interface MediaStateCallback¶
Playback Status Callback
Public Functions
-
void onState(MediaState state)¶
playback status callback
- Parameters
state – playback status
-
void onState(MediaState state)¶
-
enum MediaType¶
Playback data types
Public Functions
-
inline MediaType(int value)¶
-
inline int value()
Get the index corresponding to the data stream format
- Returns
index value
Public Members
- OB_MEDIA_COLOR_STREAM =(1)
color stream
- OB_MEDIA_DEPTH_STREAM =(2)
depth stream
- OB_MEDIA_IR_STREAM =(4)
IR stream
- OB_MEDIA_GYRO_STREAM =(8)
gyro stream
- OB_MEDIA_ACCEL_STREAM =(16)
accel stream
- OB_MEDIA_CAMERA_PARAM =(32)
camera parameter
- OB_MEDIA_DEVICE_INFO =(64)
device information
- OB_MEDIA_STREAM_INFO =(128)
stream information
- OB_MEDIA_ALL =(OB_MEDIA_COLOR_STREAM.value()| OB_MEDIA_DEPTH_STREAM.value()| OB_MEDIA_IR_STREAM.value()| OB_MEDIA_GYRO_STREAM.value()| OB_MEDIA_ACCEL_STREAM.value()| OB_MEDIA_CAMERA_PARAM.value()| OB_MEDIA_DEVICE_INFO.value()| OB_MEDIA_STREAM_INFO.value())
all types
Public Static Functions
-
static inline MediaType get(int value)
Get the data stream format corresponding to the specified index
- Parameters
value – index value
- Returns
data stream format
Private Members
- final int mValue
-
inline MediaType(int value)¶
-
class MultiDeviceSyncConfig¶
Device synchronization configuration .
Public Functions
-
inline int getDepthDelayUs()¶
The delay time of the depth image capture after receiving the capture command or trigger signal in microseconds.
- Attention
This parameter is only valid for some models, please refer to the product manual for details.
-
inline void setDepthDelayUs(int delayUs)¶
The delay time of the depth image capture after receiving the capture command or trigger signal in microseconds.
- Attention
This parameter is only valid for some models, please refer to the product manual for details.
-
inline int getColorDelayUs()¶
The delay time of the color image capture after receiving the capture command or trigger signal in microseconds.
- Attention
This parameter is only valid for some models, please refer to the product manual for details.
-
inline void setColorDelayUs(int delayUs)¶
The delay time of the color image capture after receiving the capture command or trigger signal in microseconds.
- Attention
This parameter is only valid for some models, please refer to the product manual for details.
-
inline int getTrigger2ImageDelayUs()¶
The delay time of the image capture after receiving the capture command or trigger signal in microseconds.
The depth and color images are captured synchronously as the product design and can not change the delay between the depth and color images.
- Attention
For Orbbec Astra 2 device, this parameter is valid only when the triggerOutDelayUs is set to 0.
- Attention
This parameter is only valid for some models to replace depthDelayUs and colorDelayUs, please refer to the product manual for details.
-
inline void setTrigger2ImageDelayUs(int delayUs)¶
The delay time of the image capture after receiving the capture command or trigger signal in microseconds.
The depth and color images are captured synchronously as the product design and can not change the delay between the depth and color images.
- Attention
For Orbbec Astra 2 device, this parameter is valid only when the triggerOutDelayUs is set to 0.
- Attention
This parameter is only valid for some models to replace depthDelayUs and colorDelayUs, please refer to the product manual for details.
-
inline boolean isTriggerOutEnable()¶
Trigger signal output enable flag.
After the trigger signal output is enabled, the trigger signal will be output when the capture command or trigger signal is received. User can adjust the delay time of the trigger signal output by triggerOutDelayUs.
- Attention
For some models, the trigger signal output is always enabled and cannot be disabled.
- Attention
If device is in the OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN or OB_MULTI_DEVICE_SYNC_MODE_STANDALONE mode, the trigger signal output is always disabled. Set this parameter to true will not take effect.
-
inline void setTriggerOutEnable(boolean triggerOutEnable)¶
Trigger signal output enable flag.
After the trigger signal output is enabled, the trigger signal will be output when the capture command or trigger signal is received. User can adjust the delay time of the trigger signal output by triggerOutDelayUs.
- Attention
For some models, the trigger signal output is always enabled and cannot be disabled.
- Attention
If device is in the OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN or OB_MULTI_DEVICE_SYNC_MODE_STANDALONE mode, the trigger signal output is always disabled. Set this parameter to true will not take effect.
-
inline int getTriggerOutDelayUs()¶
The delay time of the trigger signal output after receiving the capture command or trigger signal in microseconds.
- Attention
For Orbbec Astra 2 device, only supported -1 and 0. -1 means the trigger signal output delay is automatically adjusted by the device, 0 means the trigger signal output is disabled.
-
inline void setTriggerOutDelayUs(int delayUs)¶
The delay time of the trigger signal output after receiving the capture command or trigger signal in microseconds.
- Attention
For Orbbec Astra 2 device, only supported -1 and 0. -1 means the trigger signal output delay is automatically adjusted by the device, 0 means the trigger signal output is disabled.
-
inline int getFramesPerTrigger()¶
The frame number of each stream after each trigger in triggering mode.
- Attention
This parameter is only valid when the triggering mode is set to OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING or OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING.
- Attention
The trigger frequency multiplied by the number of frames per trigger cannot exceed the maximum frame rate of the stream profile which is set when starting the stream.
-
inline void setFramesPerTrigger(int frameNumPerTrigger)¶
The frame number of each stream after each trigger in triggering mode.
- Attention
This parameter is only valid when the triggering mode is set to OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING or OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING.
- Attention
The trigger frequency multiplied by the number of frames per trigger cannot exceed the maximum frame rate of the stream profile which is set when starting the stream.
-
inline int getDepthDelayUs()¶
-
enum OBCmdVersion¶
Command version associate with property id .
Public Members
- CMD_VERSION_V0 =(0)
version 1.0
- CMD_VERSION_V1 =(1)
version 2.0
- CMD_VERSION_V2 =(2)
version 3.0
- CMD_VERSION_V3 =(3)
version 4.0
- OB_CMD_VERSION_NOVERSION =(0xfffe)
- OB_CMD_VERSION_INVALID =(0xffff)
Invalid version
Private Functions
-
inline OBCmdVersion(int value)¶
Private Members
- final int iValue
- OBContext : public com.orbbec.obsensor.LobClass
Orbbec SDK context, which can perform device monitoring, query, log management and version query
Public Functions
-
inline OBContext(Context context, DeviceChangedCallback callback)¶
Create SDK context, apply for authorization, and enable device listening
- Parameters
context – For Android environment context, it is recommended to use the context of application
callback – Device listening DeviceChangedCallback
-
inline OBContext(Context context, String configPath, DeviceChangedCallback callback)¶
Create SDK context, apply for authorization, and enable device listening
- Parameters
context – For Android environment context, it is recommended to use the context of application
configPath – Profile path
callback – Device listening DeviceChangedCallback
-
inline DeviceList queryDevices()¶
Query device list
- Returns
Device List DeviceList
- inline synchronized void setDevicesChangedCallback (DeviceChangedCallback callback)
Set device plug and unplug listener callback
- Parameters
callback – Device plugging and unplugging monitor DeviceChangedCallback
- inline synchronized void removeDevicesChangedCallback ()
Remove device plug and unplug listener callback
-
inline void enableDeviceClockSync(long repeatIntervalMs)¶
Activates device clock synchronization to synchronize the clock of the host and all created devices (if supported).
- Parameters
repeatIntervalMs – The interval for auto-repeated synchronization, in milliseconds. If the value is 0, synchronization is performed only once.
-
inline void enableNetDeviceEnumeration(boolean enable)¶
enable or disable net device enumeration.
after enable, the net device will be discovered automatically and can be retrieved by queryDeviceList. The default state can be set in the configuration file.
- Attention
Net device enumeration by gvcp protocol, if the device is not in the same subnet as the host, it will be discovered but cannot be connected.
- Parameters
enable – true to enable, false to disable
-
inline boolean isNetDeviceEnumerationEnable()¶
Network device enumeration is enable
-
inline Device createNetDevice(String address, int port)¶
Create a network device object.
- Parameters
address – ip address
port – port
- Returns
Target network device object
-
inline void close()
SDK Context resource release
Public Static Functions
-
static inline void setLoggerSeverity(LogSeverity severity)¶
Setting the level of the global log will affect both the log level output to the console and the log output to the file
- Parameters
severity – Output log levelLogSeverity
-
static inline void setLoggerToConsole(LogSeverity severity)¶
Set log parameters and output to console
- Parameters
severity – Log output level LogSeverity
-
static inline void setLoggerToFile(LogSeverity severity, String directory)¶
Set log parameters and output to the specified file
- Parameters
severity – Log output level LogSeverity
directory – Save log file directory
-
static inline void setLoggerToFile(LogSeverity severity, String directory, long maxFileSize, long maxFileNum)¶
Set log parameters and output to the specified file
- Parameters
severity – Log output level LogSeverity
directory – Save log file directory
maxFileSize – Max size of each log file, unit: MB
maxFileNum – Max log file number
-
static inline void loadLicense(String licenseFilePath, String key)¶
Internal API: Config SDK license path
- Parameters
licenseFilePath – license file path
key – decrypt key,”OB_DEFAULT_DECRYPT_KEY” can be used to represent the default key
-
static inline String getVersionName()¶
Get SDK version name
- Returns
SDK version name
-
static inline int getVersionCode()¶
Get SDK version number
- Returns
SDK version number
-
static inline String getStageVersion()¶
Get sdk stage version. .
-
static inline String getCoreVersionName()¶
Get SDK kernel version name
- Returns
SDK kernel version, major.minor.patch
-
static inline int getCoreVersionCode()¶
Get SDK kernel version number
- Returns
Kernel version number
-
inline OBContext(Context context, DeviceChangedCallback callback)¶
-
class OBDataBundle¶
-
class OBException : public RuntimeException¶
Exception thrown by Orbbec sdk
-
class OBNetworkConfig¶
Network config of IP v4
Public Functions
-
inline boolean isDhcpEnable()¶
DHCP status.
Note
true: static IP; false: DHCP
-
inline void setDhcpEnable(boolean dhcpEnable)¶
DHCP status.
-
inline String getIP()¶
IP address, IP v4
-
inline void setIP(String ip)¶
IP address, IP v4
-
inline String getMask()¶
Mask, IP v4
-
inline void setMask(String mask)¶
Mask, IP v4
-
inline String getGateway()¶
Gateway, IP v4
-
inline void setGateway(String gateway)¶
Gateway, IP v4
-
inline boolean isDhcpEnable()¶
-
enum PermissionType¶
Enumeration used to describe access rights for properties
Public Functions
-
inline PermissionType(int value)¶
-
inline int value()
Get the index value corresponding to a specific property enumeration
- Returns
index value
Public Members
- OB_PERMISSION_DENY =(0)
no access
- OB_PERMISSION_READ =(1)
readable
- OB_PERMISSION_WRITE =(2)
writable
- OB_PERMISSION_READ_WRITE =(3)
can read and write
Public Static Functions
-
static inline PermissionType get(int value)
Get the attribute value corresponding to the specified index, read and write permission type enumeration
- Parameters
value – index value
- Returns
property enumeration
Private Members
- final int mValue
-
inline PermissionType(int value)¶
- Pipeline : public com.orbbec.obsensor.LobClass
pipeline: used to control data, it conflicts with the start method of the Sensor class, and the start method cannot be used to start the data stream at the same time. Additional operations can be extended, such as setting high-level interfaces such as data frame synchronization
Public Functions
-
inline Pipeline(Device device)¶
Use the specified device to create a Pipeline. To create a Pipeline through this interface, you need to create the corresponding device first.
-
inline Pipeline(String playbackFile)¶
Use the playback file to create a pipeline object
- Parameters
playbackFile – The playback file path used to create the pipeline
-
inline void start(Config config)¶
Open the data stream of the specified configuration. If you need to use the configuration in the configuration file to open the stream, pass null to config (if there is no configuration file in the case of config passing null, the first one in the open flow configuration list is used by default to open the stream. )
Note: If the pipeline is created by playback file, it means start playback, at this time, config can pass null
- Parameters
config – pipeline configuration Config
-
inline void start(Config config, FrameSetCallback callback)¶
Open the data stream of the specified configuration, and set the callback of the data frame set. If you need to use the configuration in the configuration file to open the stream, pass null to config (if there is no configuration file in the case of config passing null, the open stream configuration list is used by default. the first to open flow)
Note: If the pipeline is created by the playback file, it means that the playback starts in the callback mode. At this time, config can pass null.
Important: After the callback data frame is used up, FrameSet::close() and Frame::close() must be called to release resources.
- Parameters
config – pipeline configuration Config
callback – Data frame set callback FrameSetCallback
-
inline void stop()¶
stop data stream
-
inline FrameSet waitForFrameSet(long timeoutMilliseconds)¶
Query method to obtain data frame set Important: frameset must be called after the data frame is used, Close() and frame Close() releases resources
- Parameters
timeoutMilliseconds – wait timeout
- Returns
Data frameset FrameSet
-
inline Config getConfig()¶
Get the current pipeline configuration, which is configured by the start method
- Returns
pipeline configuration Config
-
inline void enableFrameSync()¶
Enable frame sync
-
inline void disableFrameSync()¶
disable frame sync
-
inline StreamProfileList getStreamProfileList(SensorType sensorType)¶
Get the dataflow configuration supported by the specified sensor type
- Parameters
sensorType – Sensor TypeSensorType
- Returns
stream profile list StreamProfileList
-
inline void switchConfig(Config config)¶
Dynamically switch the corresponding config configuration
- Parameters
config – pipeline configuration Config
-
inline StreamProfileList getD2CDepthProfileList(StreamProfile colorProfile, AlignMode mode)¶
Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution
- Parameters
colorProfile – Input color sensor resolution StreamProfile
mode – The align mode of D2C AlignMode
- Returns
a configuration list of matching depths
-
inline OBRect getD2CValidArea(int distance)¶
Valid area after getting D2C
- Parameters
distance – Working distance(mm)
- Returns
Returns the area information valid after D2c at the working distance OBRect
-
inline OBRect getD2CRangeValidArea(int minimumDistance, int maximumDistance)¶
Get valid area between minimum distance and maximum distance after D2C
- Parameters
minimumDistance – minimum working distance(mm)
maximumDistance – maximum working distance(mm)
- Returns
returns the area information valid after D2C at working distance
-
inline CameraParam getCameraParam()¶
Get the camera parameters after D2C. When the pipeline is created by the playback file, the camera internal parameters of the playback device are obtained
- Returns
Returns the aligned camera internal parameter CameraParam
-
inline CameraParam getCameraParamWithProfile(int colorWidth, int colorHeight, int depthWidth, int depthHeight)¶
Get camera parameters by entering color and depth resolution.
-
inline void startRecord(String filePath)¶
Start recording
- Parameters
filePath – Recorded file path
-
inline void stopRecord()¶
stop recording
-
inline Playback getPlayback()¶
Get playback object from pipeline
- Returns
Returns the playback object Playback
-
inline void close()
pipeline resource release
-
inline Pipeline(Device device)¶
- Playback : public com.orbbec.obsensor.LobClass
Data Playback
Public Functions
-
inline Playback(String filePath)¶
Create playback
- Parameters
filePath – playback file path
-
inline void start(PlaybackCallback callback, MediaType mediaType)¶
Start playback, playback data is returned from the callback
- Parameters
callback – Callback for playback data PlaybackCallback
mediaType – Type of playback data MediaType
-
inline void stop()
stop playback
-
inline DeviceInfo getDeviceInfo()¶
Get device information
- Returns
returns device information DeviceInfo
-
inline CameraParam getCameraParam()
Get the intrinsic and extrinsic parameter information in the recording file
- Returns
returns internal and external parameter information CameraParam
-
inline void setMediaStateCallback(MediaStateCallback callback)¶
Set media state callback
- Parameters
callback – media state callback
-
inline void close()
Release callback resource
-
inline Playback(String filePath)¶
-
interface PlaybackCallback¶
Data frame playback callback interface
- PointCloudFilter : public com.orbbec.obsensor.Filter
PointCloudFilter used to generate normal point cloud data, RGB point cloud data
Public Functions
-
inline PointCloudFilter()¶
Create point cloud filter
-
inline void setPointFormat(Format format)¶
Set the generated point cloud format
- Parameters
format – point cloud format Format
-
inline void setCameraParam(CameraParam param)¶
PointCloud Filter device camera parameters
- Parameters
param – Camera parameter CameraParam
-
inline void setD2CAlignStatus(boolean isAlign)¶
Set D2C alignment state
- Parameters
isAlign – D2C alignment status, true: aligned, false: not aligned
-
inline void setPositionDataScale(float scale)¶
Set the point cloud data scaling factor
- Parameters
scale – Set the point cloud coordinate data zoom factor
-
inline void setColorDataNormalization(boolean state)¶
Set point cloud color data normalization
- Parameters
state – Sets whether the point cloud color data is normalized
-
inline PointCloudFilter()¶
- PointFrame : public com.orbbec.obsensor.Frame
Point cloud frame
Public Functions
- inline void getPointCloudData (float[] data)
Return point cloud frame data
- Parameters
data – Data returned by point cloud frame
-
enum PropertyType¶
Property Type Description
Public Functions
-
inline PropertyType(int value)¶
-
inline int value()
Get the index value corresponding to a specific property enumeration
- Returns
index value
Public Members
- BOOL_PROPERTY =(0)
property of boolean data
- INT_PROPERTY =(1)
property of int data
- FLOAT_PROPERTY =(2)
property of float data
- STRUCT_PROPERTY =(3)
Properties corresponding to the underlying structure type data
Public Static Functions
-
static inline PropertyType get(int value)
Get the property value type enumeration corresponding to the specified index
- Parameters
value – index value
- Returns
property enumeration
Private Members
- final int mValue
-
inline PropertyType(int value)¶
- RawPhaseFrame : public com.orbbec.obsensor.VideoFrame
Define the RawPhaseFrame class, which inherits from the VideoFrame class .
- Recorder : public com.orbbec.obsensor.LobClass
data recorder
Public Functions
-
inline Recorder()¶
Create a recorder
-
inline Recorder(Device device)¶
Create a recorder by specifying a device
- Parameters
device – device Device
-
inline void start(String fileName, boolean async)¶
start recording
- Parameters
fileName – Recorded file name
async – Whether to record asynchronously
-
inline void stop()
Stop recording
-
inline void writeFrame(Frame frame)¶
Write frame data to the recorder
- Parameters
frame – Written frame data Frame
-
inline void close()
release recorder resources
-
inline Recorder()¶
-
enum SampleRate¶
Enumeration of IMU sample rate values (gyroscope or accelerometer)
Public Functions
-
inline SampleRate(int value)¶
-
inline int value()
Get the accelerometer or gyroscope sampling frequency enumeration value
- Returns
index value
Public Members
- ODR_1_5625_HZ =(1)
1.5625Hz
- ODR_3_125_HZ =(2)
3.125Hz
- ODR_6_25_HZ =(3)
6.25Hz
- ODR_12_5_HZ =(4)
12.5Hz
- ODR_25_HZ =(5)
25Hz
- ODR_50_HZ =(6)
50Hz
- ODR_100_HZ =(7)
100Hz
- ODR_200_HZ =(8)
200Hz
- ODR_500_HZ =(9)
500Hz
- ODR_1_KHZ =(10)
1KHz
- ODR_2_KHZ =(11)
2KHz
- ODR_4_KHZ =(12)
4KHz
- ODR_8_KHZ =(13)
8KHz
- ODR_16_KHZ =(14)
16KHz
- ODR_32_KHZ =(15)
32Hz
Public Static Functions
-
static inline SampleRate get(int value)
Get accelerometer or gyroscope sampling frequency enumeration
- Parameters
value – index value
- Returns
Accelerometer or gyroscope sampling frequency enumeration
Private Members
- final int mValue
-
inline SampleRate(int value)¶
- Sensor : public com.orbbec.obsensor.LobClass
Expose orbbec sensor function
Public Functions
-
inline SensorType getType()¶
Get sensor type
- Returns
Sensor Type SensorType
-
inline StreamProfileList getStreamProfileList()¶
Get the data stream configuration information supported by the sensor
- Returns
The list of data stream configuration information supported by the sensor StreamProfileList
-
inline void start(StreamProfile profile, FrameCallback callback)¶
Open the sensor data stream, it cannot be used with the pipeline at the same time. If the configuration in the configuration file is used to open the stream, the profile will pass null (if there is no configuration file when the null is passed, the first configuration in the configuration file list will be used by default. )
Important: After the callback data frame is used up, Frame.close() must be called to release resources.
- Parameters
profile – Data stream configuration StreamProfile
callback – Data callback FrameCallback
-
inline void stop()
turn off sensor data stream
-
inline void switchProfile(StreamProfile profile)¶
Dynamically switch resolutions
- Parameters
profile – resolution that needs to be switched StreamProfile
-
inline void close()
release sensor resources
-
inline SensorType getType()¶
-
enum SensorType¶
Enumeration value describing the sensor type
Public Functions
-
inline SensorType(int value)¶
-
inline int value()
Get the index corresponding to the sensor type
- Returns
index value
Public Members
- UNKNOWN =(0)
Unknown type sensor
- IR =(1)
infrared
- COLOR =(2)
color
- DEPTH =(3)
depth
- ACCEL =(4)
accelerometer
- GYRO =(5)
gyro
- IR_LEFT =(6)
Left IR
- IR_RIGHT =(7)
Right IR
- RAW_PHASE =(8)
Raw Phase
Public Static Functions
-
static inline SensorType get(int value)
Get the sensor type corresponding to the specified index
- Parameters
value – index value
- Returns
sensor type
Private Members
- final int mValue
-
inline SensorType(int value)¶
- StreamProfile : public com.orbbec.obsensor.LobClass
Data stream configuration base class
Subclassed by com.orbbec.obsensor.AccelStreamProfile, com.orbbec.obsensor.GyroStreamProfile, com.orbbec.obsensor.VideoStreamProfile
Public Functions
-
inline StreamType getType()
Get data stream type
- Returns
stream type StreamType
-
inline void close()
resources release
-
inline StreamType getType()
- StreamProfileList : public com.orbbec.obsensor.LobClass
stream profile list
Public Functions
-
inline int getStreamProfileCount()¶
get stream profile count
- Returns
stream profile count
-
inline StreamProfile getStreamProfile(int index)¶
Get the configuration according to the specified index in the stream configuration list
- Parameters
index – index value
- Returns
stream configuration StreamProfile
-
inline VideoStreamProfile getVideoStreamProfile(int width, int height, Format format, int fps)¶
Match the corresponding StreamProfile through the passed parameters, if there are multiple matches, the first one in the list will be returned by default
- Parameters
width – Width, if no matching width is required, pass 0
height – Height, if no matching height is required, pass 0
format – Type Format , if no matching type is required, pass Format#UNKNOWN
fps – Frame rate, pass 0 if there is no need to match the frame rate
- Returns
Returns the matching stream configuration
-
inline void close()
resources release
-
inline int getStreamProfileCount()¶
-
enum StreamType¶
Enumeration value describing the type of data stream
Public Functions
-
inline StreamType(int value)¶
-
inline int value()
Get the index corresponding to the data stream type
- Returns
index value
Public Members
- VIDEO =(0)
Video stream (infrared, color, depth streams are all video streams)
- IR =(1)
infrared stream
- COLOR =(2)
color stream
- DEPTH =(3)
depth stream
- ACCEL =(4)
Accelerometer data stream
- GYRO =(5)
Gyroscope data stream
- IR_LEFT =(6)
Left IR stream
- IR_RIGHT =(7)
Right IR stream
- RAW_PHASE =(8)
RawPhase Stream
Public Static Functions
-
static inline StreamType get(int value)
Get the data stream type corresponding to the specified index
- Parameters
value – index value
- Returns
data stream type
Private Members
- final int mValue
-
inline StreamType(int value)¶
-
enum SyncMode¶
The synchronization mode of the device.
Public Members
- OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN =(1 << 0)
free run mode
The device does not synchronize with other devices,
The Color and Depth can be set to different frame rates.
- OB_MULTI_DEVICE_SYNC_MODE_STANDALONE =(1 << 1)
standalone mode
The device does not synchronize with other devices.
The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized.
- OB_MULTI_DEVICE_SYNC_MODE_PRIMARY =(1 << 2)
primary mode
The device is the primary device in the multi-device system, it will output the trigger signal via VSYNC_OUT pin on synchronization port by default.
The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.
- OB_MULTI_DEVICE_SYNC_MODE_SECONDARY =(1 << 3)
secondary mode
The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It will out the trigger signal via VSYNC_OUT pin on synchronization port by default.
The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.
After starting the stream, the device will wait for the trigger signal to start capturing images, and will stop capturing images when the trigger signal is stopped.
- Attention
The frequency of the trigger signal should be same as the frame rate of the stream profile which is set when starting the stream.
- OB_MULTI_DEVICE_SYNC_MODE_SECONDARY_SYNCED =(1 << 4)
secondary synced mode
The device is the secondary device in the multi-device system, it will receive the trigger signal via VSYNC_IN pin on synchronization port. It will out the trigger signal via VSYNC_OUT pin on synchronization port by default.
The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.
After starting the stream, the device will be immediately start capturing images, and will adjust the capture time when the trigger signal is received to synchronize with the primary device. If the trigger signal is stopped, the device will still capture images.
- Attention
The frequency of the trigger signal should be same as the frame rate of the stream profile which is set when starting the stream.
- OB_MULTI_DEVICE_SYNC_MODE_SOFTWARE_TRIGGERING =(1 << 5)
software triggering mode
The device will start one time image capture after receiving the capture command and will output the trigger signal via VSYNC_OUT pin by default. The capture command can be sent form host by call ob_device_trigger_capture. The number of images captured each time can be set by framesPerTrigger.
The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.
The frequency of the user call ob_device_trigger_capture to send the capture command multiplied by the number of frames per trigger should be less than the frame rate of the stream profile which is set when starting the stream.
- OB_MULTI_DEVICE_SYNC_MODE_HARDWARE_TRIGGERING =(1 << 6)
hardware triggering mode
The device will start one time image capture after receiving the trigger signal via VSYNC_IN pin on synchronization port and will output the trigger signal via VSYNC_OUT pin by default. The number of images captured each time can be set by framesPerTrigger.
The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized and can be adjusted by colorDelayUs, depthDelayUs or trigger2ImageDelayUs.
- Attention
The frequency of the trigger signal multiplied by the number of frames per trigger should be less than the frame rate of the stream profile which is set when starting the stream.
- Attention
The trigger signal input via VSYNC_IN pin on synchronization port should be ouput by other device via VSYNC_OUT pin in hardware triggering mode or software triggering mode.
- Attention
Due to different models may have different signal input requirements, please do not use different models to output trigger signal as input-trigger signal.
Private Members
- final int mValue
-
class TimestampResetConfig¶
The timestamp reset configuration of the device.
Public Functions
-
inline boolean isEnable()¶
Whether to enable the timestamp reset function.
If the timestamp reset function is enabled, the timer for calculating the timestamp for output frames will be reset to 0 when the timestamp reset command or timestamp reset signal is received, and one timestamp reset signal will be output via TIMER_SYNC_OUT pin on synchronization port by default. The timestamp reset signal is input via TIMER_SYNC_IN pin on the synchronization port.
- Attention
For some models, the timestamp reset function is always enabled and cannot be disabled.
-
inline void setEnable(boolean enable)¶
Whether to enable the timestamp reset function.
If the timestamp reset function is enabled, the timer for calculating the timestamp for output frames will be reset to 0 when the timestamp reset command or timestamp reset signal is received, and one timestamp reset signal will be output via TIMER_SYNC_OUT pin on synchronization port by default. The timestamp reset signal is input via TIMER_SYNC_IN pin on the synchronization port.
- Attention
For some models, the timestamp reset function is always enabled and cannot be disabled.
-
inline int getTimestampResetDelayUs()¶
The delay time of executing the timestamp reset function after receiving the command or signal in microseconds. .
-
inline void setTimestampResetDelayUs(int delayUs)¶
The delay time of executing the timestamp reset function after receiving the command or signal in microseconds. .
-
inline boolean isTimestampResetSignalOutputEnable()¶
the timestamp reset signal output enable flag.
- Attention
For some models, the timestamp reset signal output is always enabled and cannot be disabled.
-
inline void setTimestampResetSignalOutputEnable(boolean enable)¶
the timestamp reset signal output enable flag.
- Attention
For some models, the timestamp reset signal output is always enabled and cannot be disabled.
-
inline boolean isEnable()¶
-
interface UpgradeCallback¶
Firmware upgrade callback class
Public Functions
-
void onCallback(short state, short percent, String msg)¶
Firmware upgrade callback
- Parameters
state – current state
msg – status information
percent – Current status progress, percentage 0~100
Public Members
-
short STAT_FILE_TRANSFER = 4¶
Firmware file transfer status
-
short STAT_DONE = 3¶
Firmware upgrade complete
-
short STAT_IN_PROGRESS = 2¶
Firmware upgrade in progress
-
short STAT_START = 1¶
Firmware upgrade starts
-
short STAT_VERIFY_IMAGE = 0¶
Firmware file verification
-
short ERR_VERIFY = -1¶
Firmware file verification failed
-
short ERR_PROGRAM = -2¶
program error
-
short ERR_ERASE = -3¶
Erase failed
-
short ERR_FLASH_TYPE = -4¶
flash type failed
-
short ERR_IMG_SIZE = -5¶
Firmware file size failed
-
short ERR_OTHER = -6¶
other errors
-
short ERR_DDR = -7¶
DDR error
-
short ERR_TIMEOUT = -8¶
Upgrade timed out
-
void onCallback(short state, short percent, String msg)¶
- VideoFrame : public com.orbbec.obsensor.Frame
Base class for ColorFrame, DepthFrame, IRFrame
Subclassed by com.orbbec.obsensor.ColorFrame, com.orbbec.obsensor.DepthFrame, com.orbbec.obsensor.IRFrame, com.orbbec.obsensor.RawPhaseFrame
Public Functions
-
inline int getWidth()¶
Get the height of the data frame
- Returns
height of the data frame
-
inline int getHeight()¶
Get the width of the data frame
- Returns
width of the data frame
-
inline int getPixelAvailableBitSize()¶
Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are valid bits, and the upper 6 bits are filled with 0) Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format
- Returns
Returns the effective number of pixels in pixels, or 0 if it is an unsupported format
-
inline int getWidth()¶
- VideoStreamProfile : public com.orbbec.obsensor.StreamProfile
Data stream configuration for Color, Depth, IR stream
Public Functions
-
inline int getWidth()
Get data stream width
- Returns
data stream width
-
inline int getHeight()
Get data flow height
- Returns
data flow height
-
inline int getFps()¶
Get data stream frame rate per second
- Returns
streaming frame rate
-
inline void close()
resource release
-
inline int getWidth()
-
namespace datatype¶
- CameraDistortion : public com.orbbec.obsensor.DataType
Distortion Parameters
Public Functions
-
inline float getK1()¶
Get Radial Distortion Factor 1
- Returns
Radial distortion factor 1
-
inline float getK2()¶
Get Radial Distortion Factor 2
- Returns
Radial distortion factor 2
-
inline float getK3()¶
Get Radial Distortion Factor 3
- Returns
Radial distortion factor 3
-
inline float getK4()¶
Get Radial Distortion Factor 4
- Returns
Radial distortion factor 4
-
inline float getK5()¶
Get Radial Distortion Factor 5
- Returns
Radial distortion factor 5
-
inline float getK6()¶
Get Radial Distortion Factor 6
- Returns
Radial distortion factor 6
-
inline float getP1()¶
Get the tangential distortion factor 1
- Returns
Tangential distortion factor 1
-
inline float getP2()¶
Get the tangential distortion factor 2
- Returns
Tangential distortion factor 2
-
inline int BYTES()¶
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline float getK1()¶
- CameraIntrinsic : public com.orbbec.obsensor.DataType
Camera internal parameters
Public Functions
-
inline float getFx()¶
Get the focal length in the x direction, unit: pixel
- Returns
returns the focal length in the x-direction
-
inline float getFy()¶
Get the focal length in the y direction, unit: pixel
- Returns
returns the y-direction focal length
-
inline float getCx()¶
Get the abscissa of the optical center
- Returns
returns the abscissa of the optical center
-
inline float getCy()¶
Get the ordinate of the optical center
- Returns
returns the ordinate of the optical center
-
inline short getWidth()¶
get image width
- Returns
returns image width
-
inline short getHeight()¶
get image height
- Returns
returns image height
-
inline int BYTES()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline float getFx()¶
- CompressionParams : public com.orbbec.obsensor.DataType
Compression parameters
Public Functions
-
inline void setThreshold(int threshold)¶
Setter, Lossy compression threshold, range [0~255], recommended value is 9, the higher the threshold, the higher the compression ratio.
-
inline int getThreshold()¶
Getter, Lossy compression threshold, range [0~255], recommended value is 9, the higher the threshold, the higher the compression ratio.
-
inline int BYTES()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline void setThreshold(int threshold)¶
- D2CTransform : public com.orbbec.obsensor.DataType
Rotation/Transformation Matrix
Public Functions
- inline float[] getRot ()
Get rotation matrix, row-major
- Returns
rotation matrix
- inline float[] getTrans ()
get transformation matrix
- Returns
transformation matrix
-
inline int BYTES()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
- DeviceTemperature : public com.orbbec.obsensor.DataType
Device temperature information
Public Functions
-
inline float getCpuTemp()¶
Get CPU temperature, unit: Celsius
- Returns
CPU temperature
-
inline float getIrTemp()¶
Get IR sensor temperature, unit: Celsius
- Returns
IR sensor temperature
-
inline float getLdmTemp()¶
Get the temperature of the laser module, unit: Celsius
- Returns
Laser module temperature
-
inline float getMainBoardTemp()¶
Get the motherboard temperature, unit: Celsius
- Returns
motherboard temperature
-
inline float getTecTemp()¶
Get the TEC temperature in degrees Celsius
- Returns
TEC temperature
-
inline float getImuTemp()¶
Get IMU sensor temperature, unit: Celsius
- Returns
IMU sensor temperature
-
inline float getRgbTemp()¶
Get RGB sensor temperature, unit: Celsius
- Returns
RGB sensor temperature
-
inline float getIrLeftTemp()¶
Get temperature of Left IR, unit: degree Celsius
- Returns
Left IR sensor temperature
-
inline float getIrRightTemp()¶
Get temperature of Right IR, unit: degree Celsius
- Returns
Right IR sensor temperature
-
inline float getChipTopTemp()¶
Get top temperature of MX6600 chip. unit: degree Celsius
-
inline float getChipBottomTemp()¶
Get bottom temperature of MX6600 chip. unit: degree Celsius
-
inline int BYTES()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline float getCpuTemp()¶
- ExposureThresholdControl : public com.orbbec.obsensor.DataType
TOF Exposure Threshold
Public Functions
-
inline int getUpper()¶
Get the upper limit of the threshold, unit: ms
- Returns
upper threshold
-
inline int getLower()¶
Get the lower limit of the threshold, unit: ms
- Returns
lower threshold
-
inline void setUpper(int upper)¶
Set the upper limit of the threshold, unit: ms
- Parameters
upper – upper threshold value
-
inline void setLower(int lower)¶
Set the lower limit of the threshold, unit: ms
- Parameters
lower – Lower threshold value
-
inline int BYTES()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline int getUpper()¶
- OBRect : public com.orbbec.obsensor.DataType
Rectangle description
Public Functions
-
inline int getX()¶
Get the x-coordinate of the origin of the rectangle
- Returns
returns the x-coordinate of the origin of the rectangle
-
inline int getY()¶
Get the y-coordinate of the origin of the rectangle
- Returns
returns the y coordinate of the origin of the rectangle
-
inline int getWidth()
get rectangle width
- Returns
returns the width of the rectangle
-
inline int getHeight()
get rectangle height
- Returns
returns the height of the rectangle
-
inline int BYTES()
Get the number of bytes occupied by the Native structure
- Returns
The number of bytes occupied by the Native structure
-
inline int getX()¶